<h1>Objects from user: {{currentUser.user_name}}</h1>
<hr />
<div class="row">
  <div class="col-9">
    <table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger" class="table table-striped table-hover">
      <thead>
      <tr>
        <th scope="col">Public ID</th>
        <th scope="col">Type</th>
        <th scope="col">Summary</th>
        <th scope="col">Creation time</th>
        <th scope="col">Last edit time</th>
        <th scope="col">Action</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let yourObject of userObjects">
        <th scope="row">{{yourObject?.object_information?.object_id}}</th>
        <td>{{yourObject?.type_information?.type_label}}</td>
        <td>
          <i class="{{yourObject?.type_information?.icon}}"></i> {{yourObject?.type_information?.type_label}}
          #{{yourObject?.object_information?.object_id}}
          <span *ngFor="let sum of yourObject?.summaries; let last = last; let first = first">
            <span *ngIf="first"> - </span>{{sum.value}}<span *ngIf="!last"> | </span>
          </span>
        </td>
        <td>{{yourObject?.object_information?.creation_time.$date | date:"dd/MM/yyyy - HH:mm:ss"}}</td>
        <td>{{yourObject?.object_information?.last_edit_time.$date | date:"dd/MM/yyyy - HH:mm:ss"}}</td>
        <td>
          <a routerLink="/framework/object/view/{{yourObject?.object_information?.object_id}}">View</a>
          <a class="ml-2" routerLink="/framework/object/view/{{yourObject?.object_information?.object_id}}">Edit</a>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
  <div class="col-3">
    <div class="card">
      <div class="card-header">Your objects</div>
      <ul class="list-group list-group-flush">
        <li class="list-group-item">Number: {{userObjectsLength}}</li>
      </ul>
    </div>
  </div>
</div>
